﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace ReadNovel.API.Response
{
    public interface IResponse
    {
        string Body { get; set; }

        bool IsOk { get; }

        String ErrorMessage { get; set; }
    }

    [DataContract]
    public abstract class BaseResponse : IResponse
    {
        public string Body
        {
            get;
            set;
        }

        public String ErrorMessage { get; set; }

        public bool IsOk
        {
            get
            {
                return ErrorMessage == null;
            }
        }

    }
}
